Examples 4-1 to 4-8 are in the EventExamples project:

 Example 4-1 is in Window1.xaml
 Example 4-2 is in Window1.xaml.cs
 Example 4-3 is in HaltingEvents.xaml.cs
 Example 4-4 is in CodeEvents.xaml.cs
 Example 4-5 is in AddHandler.xaml.cs
 Example 4-6 is in AttachedEvents.xaml
 Examples 4-7 and 4-8 are in AttachedEvents.xaml


Examples 4-9 to 4-11 are in the MouseInput project in Window1.xaml.cs

Examples 4-12 and 4-13 are in the KeyboardInput project in Window1.xaml.cs

Example 4-14 is in Example 4-14.xaml
Example 4-14 is in Example 4-15.xaml

Example 4-16 is in CommandBasics, in Window1.xaml and Window1.xaml.cs

Examples 4-17 to 4-24 are in the Commanding project

 Example 4-17 is in MyAppCommands.cs
 Examples 4-18 and 4-19 are in Window1.xaml
 Example 4-20 is not real; ICommandSource is defined by WPF
 Example 4-21 and is in Window1.xaml
 Examples 4-22 and 4-23 are in Window1.xaml.cs
 Example 4-24 is in CommandData.xaml.cs


Example 4-25 is in the CommandHandling project in Window1.xaml.cs

Example 4-26 is in the CommandEnabling project in Window1.xaml.cs

Examples 4-27 to 4-30 are in Example 4-27.xaml to Example 4-30.xaml